package com.alone.embedded.lucene.spring.annotation;

import java.lang.annotation.*;

/**
 * 事务
 *
 * @author Alone
 * @date 2022/9/1 3:14 下午
 * @see com.alone.embedded.lucene.spring.ElTransactionAspect
 * @see com.alone.embedded.lucene.transaction.ElTransactionManager
 */
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface ElTransactional {

    /**
     * 单位: 秒
     */
    int timeout() default -1;

    Class<? extends Throwable>[] rollbackFor() default {RuntimeException.class};

}

